package ar.com.uade.administradorsiembra.vista;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List;

import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.ListModel;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;

import ar.com.uade.administradorsiembra.controladores.ABMCerealController;
import ar.com.uade.administradorsiembra.controladores.ABMLoteCompuestoController;
import ar.com.uade.administradorsiembra.views.LoteCompuestoView;
import ar.com.uade.administradorsiembra.views.LoteView;
import ar.com.uade.administradorsiembra.views.MineralView;
import ar.com.uade.administradorsiembra.views.PropietarioView;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class ModificarLoteCompuestoGUI extends javax.swing.JFrame {
	private JLabel jNumeroLoteCompuestoLabel;
	private JPanel jLotesQueComponenPanel;
	private JComboBox jNumeroLoteCompuestoComboBox;
	private JButton jAgregarButton;
	private JButton jCancelarButton;
	private JList jLotesQueComponenList;
	private ABMLoteCompuestoController loteController;
	private List<LoteView> lotes;
	private List<LoteCompuestoView> lotesCompuestos;
	

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
		} catch(Exception e) {
			e.printStackTrace();
		}
	}


	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void iniciar() {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				ModificarLoteCompuestoGUI inst = new ModificarLoteCompuestoGUI();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public ModificarLoteCompuestoGUI() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			this.loteController = ABMLoteCompuestoController.getInstancia();
			this.lotesCompuestos = this.loteController.getLotesCompuestos();
			this.lotes = this.loteController.getLotes();
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			this.setTitle("Modificar Lote Compuesto");
			{
				jNumeroLoteCompuestoLabel = new JLabel();
				getContentPane().add(jNumeroLoteCompuestoLabel);
				jNumeroLoteCompuestoLabel.setText("Numero de Lote Compuesto");
				jNumeroLoteCompuestoLabel.setBounds(24, 27, 153, 14);
			}
			{
				jLotesQueComponenPanel = new JPanel();
				getContentPane().add(jLotesQueComponenPanel);
				jLotesQueComponenPanel.setBounds(24, 62, 341, 165);
				jLotesQueComponenPanel.setBorder(BorderFactory.createTitledBorder(""));
				jLotesQueComponenPanel.setLayout(null);
				{
					ListModel jLotesQueComponenListModel = 
						new DefaultComboBoxModel(
								new String[] { "Item One", "Item Two" });
					jLotesQueComponenList = new JList();
					jLotesQueComponenPanel.add(jLotesQueComponenList);
					BoxLayout jLotesQueComponenListLayout = new BoxLayout(jLotesQueComponenList, javax.swing.BoxLayout.Y_AXIS);
					jLotesQueComponenList.setLayout(jLotesQueComponenListLayout);
					jLotesQueComponenList.setModel(jLotesQueComponenListModel);
					jLotesQueComponenList.setBounds(28, 14, 275, 128);
				}
			}
			{
				jCancelarButton = new JButton();
				getContentPane().add(jCancelarButton);
				jCancelarButton.setText("Cancelar");
				jCancelarButton.setBounds(286, 269, 79, 23);
				jCancelarButton.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						System.out.println("jCancelarButton.actionPerformed, event="+evt);
						//TODO add your code for jCancelarButton.actionPerformed
						dispose();
					}
				});
			}
			{
				jAgregarButton = new JButton();
				getContentPane().add(jAgregarButton);
				jAgregarButton.setText("Agregar");
				jAgregarButton.setBounds(194, 269, 76, 23);
				jAgregarButton.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						System.out.println("jAgregarButton.actionPerformed, event="+evt);
						//TODO add your code for jAgregarButton.actionPerformed
					}
				});
			}
			{
				ComboBoxModel jNumeroLoteCompuestoComboBoxModel = 
					new DefaultComboBoxModel(
							new String[] { "Item One", "Item Two" });
				jNumeroLoteCompuestoComboBox = new JComboBox();
				getContentPane().add(jNumeroLoteCompuestoComboBox);
				jNumeroLoteCompuestoComboBox.setModel(jNumeroLoteCompuestoComboBoxModel);
				jNumeroLoteCompuestoComboBox.setBounds(181, 24, 98, 20);
				jNumeroLoteCompuestoComboBox.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						jNumeroLoteCompuestoComboBoxActionPerformed(evt);
					}
				});
			}
			pack();
			this.setSize(406, 341);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private void jComboBox1ActionPerformed(ActionEvent evt) {
		System.out.println("jComboBox1.actionPerformed, event="+evt);
		//TODO add your code for jComboBox1.actionPerformed
	}
	
	private void jNumeroLoteCompuestoComboBoxActionPerformed(ActionEvent evt) {
		System.out.println("jNumeroLoteCompuestoComboBox.actionPerformed, event="+evt);
		//TODO add your code for jNumeroLoteCompuestoComboBox.actionPerformed
	}

}
